package com.example.wxCode.domain;

import lombok.Data;

/**
 * @Description
 * @Author zengzerui
 * @Date 2025/4/15
 */
@Data
public class Result {
    private int code;
    private String msg;
    private Object data;

    public static Result ok(Object data) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg("ok");
        result.setData(data);
        return result;
    }

    public static Result fail(String msg) {
        Result result = new Result();
        result.setCode(-1);
        result.setMsg(msg);
        return result;
    }
}
